package cn.chinaflame.pagodas.utils;

import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

import cn.chinaflame.pagodas.utils.stl.DateUtils;

/**
* @author    created by lbq
* @date	     2018年7月19日 下午4:10:42
**/
public class MapHeadUtil {
	private static String url="http://58.246.52.102:8081/webgate/pay.htm";
	final static String IP_ADDRESS = "localhost";
	final static String signType = "2";
	private static String merCode="10000009550";//佛龛测试商户

	public static Map<String, String> headMap(String orderId){
		Map<String, String> headMap = new LinkedHashMap<String, String>();
		headMap.put("serCode", "203006");
		headMap.put("merCode", merCode);
		headMap.put("orderId", orderId);
		headMap.put("merDate", DateUtils.format(new Date(), DateUtils.FILEDATE_PATTERM));
		headMap.put("merTime", DateUtils.format(new Date(), DateUtils.DATETIME_PATTERM));
		headMap.put("versionNo", "1.0.5");
		headMap.put("signType", signType);
		return headMap;
	}
	
	/**
	 * 订单结算
	 * @param orderId
	 * @return
	 */
	public static Map<String, String> headMapForOrderSybc(){
		Map<String, String> headMap = new LinkedHashMap<String, String>();
		headMap.put("serCode", "203010");
		headMap.put("merCode", merCode);
		headMap.put("orderId", System.currentTimeMillis()+"");
		headMap.put("merDate", DateUtils.format(new Date(), DateUtils.FILEDATE_PATTERM));
		headMap.put("merTime", DateUtils.format(new Date(), DateUtils.DATETIME_PATTERM));
		headMap.put("versionNo", "1.0.1");
		headMap.put("signType", signType);
		return headMap;
	}
	
}
